// 导入
import request from '@/utils/request'

// 新增
export const saveApi = (data) => {
  return request({
    url: 'api/sysuser/save',
    method: 'post',
    data:data
  })
}
//查询
export const pageApi = (data) => {
  return request({
    url: 'api/sysuser/page',
    method: 'get',
    params: data
  })
}
//修改
export const updateApi = (data) => {
  return request({
    url: 'api/sysuser/update',
    method: 'post',
    data: data
  })
}
//修改
export const deleteApi = (data) => {
  return request({
    url: 'api/sysuser/delete',
    method: 'post',
    data: data
  })
}
//修改角色 分配角色
export const updateRoleApi = (data) => {
  return request({
    url: 'api/sysuser/updaterole',
    method: 'post',
    data: data
  })
}

//批量删除
export const deleteBatchApi = (data) => {
  return request({
    url: 'api/sysuser/deletebatch',
    method: 'post',
    data: data
  })
}
//登录
export const loginApi = (data) => {
  return request({
    url: 'api/sysuser/login',
    method: 'post',
    data: data
  })
}
//退出
export const logoutApi = () => {
  return request({
    url: 'api/sysuser/logout',
    method: 'get'
  })
}